package com.ftg.learn.util;

import lombok.Data;

/**
 * 通用信息封装
 *
 * @author 布衣
 */
@Data
public class PageUtil<T> {

    private Integer code;

    private String msg;

    private T data;

    public static <E>  PageUtil<E> success(E data){
        PageUtil<E> pageUtil = new PageUtil<>();
        pageUtil.setCode(200);
        pageUtil.setMsg("success");
        pageUtil.setData(data);
        return pageUtil;
    }

}
